<local:DocumentBase x:Class="WPFExcelReport.YCAAUTOFSAB"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    xmlns:exc="clr-namespace:IntexReportStudio.UserControls"
                    Loaded="Window_Loaded"  
                    Background="White"  
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <ucd:PreisConverter  x:Key="PreisConverter"/>
        <ucd:PNumConverter  x:Key="pnum"/>
        <db:SETINTEXDB  x:Key="SetData" />
        <db:SETINTEXDB  x:Key="Set4ITX" />
        <db:SETINTEXDB  x:Key="SetVITX" />
        <CollectionViewSource   x:Key="vwABPOS_MAT" Source="{Binding Path=ABPOS_MAT,Source={StaticResource SetData}}" />
        <CollectionViewSource   x:Key="vwVAFARBEN_EXT" Source="{Binding Path=VAFARBEN_EXT,Source={StaticResource SetData}}" />
    </local:DocumentBase.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*" MinHeight="300"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"></ColumnDefinition>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0">
            <Expander Name="expLog" ExpandDirection="Left" IsExpanded="True" Visibility="Hidden">
                <WrapPanel Name="zoneCommand" Height="34" Margin="0,0,0,6">
                    <Label   Content="{Binding Source={Localization:Translate Word=系统}}" Width="Auto" Margin="0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                    <TextBox   Name="txtMANDANT" MaxLength="2" Width="40" Margin="10,0,0,0"  HorizontalAlignment="Left" Background="Pink" FontSize="18" >00</TextBox>
                    <Label  Content="{Binding Source={Localization:Translate Word=语言}}" Width="Auto" Margin="0,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                    <TextBox   IsReadOnly="True" Name="txtSPRACHKZ" Width="40" Margin="0,0,0,0" Text="" MaxLength="1" HorizontalAlignment="Left" Background="Pink" FontSize="18" />
                    <Label  Content="{Binding Source={Localization:Translate Word=用户名}}" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                    <TextBox  Name="txtUserID" Width="80" Margin="10,0,0,0" Text="" HorizontalAlignment="Left" Background="Yellow" FontSize="18" MaxLength="8" AcceptsTab="True" CharacterCasing="Upper" KeyboardNavigation.TabIndex="0" />
                    <Label Content="{Binding Source={Localization:Translate Word=密码}}" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" FontSize="18" VerticalAlignment="Center" />
                    <PasswordBox  Name="txtPassword" Width="80" Margin="10,0,0,0" HorizontalAlignment="Left" Background="Yellow" FontSize="18" KeyboardNavigation.TabIndex="1" />
                    <Button  Height="Auto" Margin="10,0,0,0" Name="btnLogIn" Width="34" Click="btnLogIn_Click" KeyboardNavigation.TabIndex="2" IsDefault="True">
                        <Button.Background>
                            <ImageBrush  ImageSource="/IntexReportClient;component/Images/User.png" />
                        </Button.Background>
                    </Button> 
                    <TextBlock  Name="txtLogIn" Width="Auto" Margin="10,0,0,0" HorizontalAlignment="Left" Background="White" FontSize="14" KeyboardNavigation.TabIndex="1" />
                </WrapPanel>
            </Expander>
            <WrapPanel Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
                <StackPanel >
                    <Button Name="butExcelLoad" Width="40" Height="40" HorizontalAlignment="Left" Click="butExcelLoad_Click">
                        <Button.Background>
                            <ImageBrush  ImageSource="/IntexReportClient;component/Images/excel_icon_1.png" />
                        </Button.Background>
                    </Button>
                    <TextBlock Text="{Binding Source={Localization:Translate Word=数据载入}}"></TextBlock>
                </StackPanel>
                <StackPanel >
                    <Button Name="btnSaveWork" Click="btnSaveWork_Click" Margin="30,0,0,0" Height="40" Width="40">
                        <Button.Background>
                            <ImageBrush  ImageSource="/IntexReportClient;component/Images/Upload.png" />
                        </Button.Background>
                    </Button>
                    <TextBlock Margin="30,0,0,0" Text="{Binding Source={Localization:Translate Word=上传数据}}" ></TextBlock>
                </StackPanel>
                <StackPanel Grid.Row="0" Grid.Column="0"
            Grid.ColumnSpan="4" Orientation="Horizontal" >
                    <TextBlock FontSize="18"  Height="40"   Width="59" Name="txt1" Margin="0,0,0,0" Text="{Binding Source={Localization:Translate Word=生产单}}" />
                    <TextBox Background="Yellow"  FontSize="18"  Height="36"   Width="40" Name="txtABPAUFKRS" CharacterCasing="Upper" Margin="10,0,0,0" Text="" />
                    <TextBox Background="Green"  FontSize="18" Height="36"    Width="80" Name="txtABPAUFLFD"   Margin="15,0,0,0" Text="" />
                    <Button FontSize="18" Content="{Binding Source={Localization:Translate Word=查询}}" Height="40" Margin="20,0,0,0" Name="butGetData" Click="btnQuery_Click"></Button>
                    <Button Content="{Binding Source={Localization:Translate Word=打印}}"  FontSize="18" Height="40" Margin="20,0,0,0"  Name="btnPrint" Width="Auto" Click="btnPrint_Click"/>
                </StackPanel>
            </WrapPanel>
        </StackPanel>
        <DockPanel Grid.Row="1" LastChildFill="True">      
           <FlowDocumentScrollViewer DockPanel.Dock="Right" MaxWidth="400">
                    <FlowDocument>
                        <Paragraph>
                            <TextBlock HorizontalAlignment="Stretch" Name="listABPOS"></TextBlock>
                            <Expander Grid.Row="1" IsExpanded="True" ExpandDirection="Right">
                                <exc:EventLog   x:Name="_LogExplorerDock" ></exc:EventLog>
                            </Expander>
                        </Paragraph>
                    </FlowDocument>
                </FlowDocumentScrollViewer>
            <FlowDocumentScrollViewer >
                <FlowDocument>
                    <Paragraph>
                        <StackPanel  Margin="20,0,0,0" Grid.RowSpan="1">
                            <TextBlock Name="listGS08N"></TextBlock>
                            <DataGrid  x:Name="dlgABPOS_EXT"
                       ItemsSource="{Binding Source={StaticResource ResourceKey=vwABPOS_MAT}}"  
                       AutoGenerateColumns="False" EnableRowVirtualization="True"
                       VerticalScrollBarVisibility="Auto"
                       HorizontalScrollBarVisibility="Auto"
                       VerticalAlignment="Stretch"
                       HeadersVisibility="Column" 
                       FontSize="12"
                       HorizontalAlignment="Stretch"
                       SelectionChanged="dlgABPOS_SelectionChanged"    
                        EnableColumnVirtualization="True">
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=ROWID}" Header="{Binding Source={Localization:Translate Word=行}}" Width="Auto" MinWidth="20" />
                        <DataGridTextColumn Binding="{Binding Path=FS05}" Header="{Binding Source={Localization:Translate Word=BOM}}" Width="Auto" MinWidth="20" />
                        <DataGridTextColumn Binding="{Binding Path=ABPART}" Header="{Binding Source={Localization:Translate Word=款式}}" Width="Auto" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=ABPFARBE}" Header="{Binding Source={Localization:Translate Word=颜色}}" Width="Auto" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=ABPLIEFDAT}" Header="{Binding Source={Localization:Translate Word=交期}}" Width="Auto" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=ABPGROES}" Header="{Binding Source={Localization:Translate Word=S}}" Width="Auto" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=ABPGROEM}" Header="{Binding Source={Localization:Translate Word=M}}" Width="Auto" MinWidth="40" />
                        <DataGridTextColumn Binding="{Binding Path=ABPGROEL}" Header="{Binding Source={Localization:Translate Word=L}}" Width="Auto" MinWidth="60" />
                        <DataGridTextColumn Binding="{Binding Path=ABPGROEXL}" Header="{Binding Source={Localization:Translate Word=XL}}" Width="Auto" MinWidth="60" />
                    </DataGrid.Columns>
                </DataGrid>
                        </StackPanel>
                    </Paragraph>
                </FlowDocument>
            </FlowDocumentScrollViewer>
        </DockPanel>
    </Grid>    
</local:DocumentBase>
